package foodmaterial.entity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

import java.io.Serializable;

public class UserRoleRelation implements Serializable {

    private static final long serialVersionUID = -8719293922503531824L;

    public UserRoleRelation() {
    }

    public UserRoleRelation(Long id, Long userId, Long roleId) {
        this.id = id;
        this.userId = userId;
        this.roleId = roleId;
    }

    @JsonSerialize(using= ToStringSerializer.class)
    private Long id ;

    @JsonSerialize(using= ToStringSerializer.class)
    private Long userId ;

    @JsonSerialize(using= ToStringSerializer.class)
    private Long roleId ;



    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    @Override
    public String toString() {
        return "UserRoleRelation{" +
                "id=" + id +
                ", userId=" + userId +
                ", roleId=" + roleId +
                '}';
    }
}
